package entities;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.Entity;

@Entity
public class Folder extends TreeNode implements Serializable {

    @Override
    public String getType() {
        return "folder";
    }
    
    public List<LinkCollection> getLinkCollections() {
        List<LinkCollection> linkCollections = new ArrayList<LinkCollection>();
        for (TreeNode tn : getChilds()) {
            if (tn instanceof LinkCollection) {
                linkCollections.add((LinkCollection)tn);
            }
        }
        return linkCollections; 
    }
}